public class OverrideDemo11 {
    public static void main(String[] args) {
        Son son = new Son();
        son.setName("老八");
        son.eat();
    }

}

class Father {
    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void eat() {
        System.out.println("吃面条");
    }
}

class Son extends Father {
//    public void eat() {
//        System.out.println("吃蜜汁小汉堡");
//    }


    @Override
    public void eat() {
        System.out.println("吃蜜汁小汉堡");
    }
}
